package com.r2dbc.repository;

import com.r2dbc.entity.UserEntity;
import org.springframework.data.repository.reactive.ReactiveCrudRepository;
import org.springframework.stereotype.Repository;
import reactor.core.publisher.Flux;
import org.springframework.data.domain.Pageable;
/**
 * @author tag repository zzp 2020-10-09
 */
@Repository
public interface UserRepository extends ReactiveCrudRepository<UserEntity,Integer> {
    /**
     *  模糊查询加分页 and  order by id desc
      * @param name  tagname
     * @param page  page  pagesize
     * findByNameStartingWithOrderByIdDesc
     *              StartingWith
     * @return UserEntity
     */
    Flux<UserEntity> findByNameStartingWithOrderByIdDesc (String name ,Pageable page);

}
